3.39 \(\int \frac{\csc (c+d x)}{a-a \sin ^2(c+d x)} \, dx\)

Optimal. Leaf size=29 \[ \frac{\sec (c+d x)}{a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a d} \]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a*d)) + Sec[c + d*x]/(a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0575448, antiderivative size = 29, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.182, Rules used = {3175, 2622, 321, 207} \[ \frac{\sec (c+d x)}{a d}-\frac{\tanh ^{-1}(\cos (c+d x))}{a d} \]

Antiderivative was successfully verified.

[In]

Int[Csc[c + d*x]/(a - a*Sin[c + d*x]^2),x]

[Out]

-(ArcTanh[Cos[c + d*x]]/(a*d)) + Sec[c + d*x]/(a*d)

Rule 3175

Int[(u_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]^2)^(p_), x_Symbol] :> Dist[a^p, Int[ActivateTrig[u*cos[e + f*x
]^(2*p)], x], x] /; FreeQ[{a, b, e, f, p}, x] && EqQ[a + b, 0] && IntegerQ[p]

Rule 2622

Int[csc[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_), x_Symbol] :> Dist[1/(f*a^n), Subst[Int
[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n
 + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 207

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTanh[(Rt[b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[b, 2]), x] /;
 FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])

Rubi steps

\begin{align*} \int \frac{\csc (c+d x)}{a-a \sin ^2(c+d x)} \, dx &=\frac{\int \csc (c+d x) \sec ^2(c+d x) \, dx}{a}\\ &=\frac{\operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=\frac{\sec (c+d x)}{a d}+\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\sec (c+d x)\right )}{a d}\\ &=-\frac{\tanh ^{-1}(\cos (c+d x))}{a d}+\frac{\sec (c+d x)}{a d}\\ \end{align*}

Mathematica [A]  time = 0.0429316, size = 46, normalized size = 1.59 \[ \frac{\frac{\sec (c+d x)}{d}+\frac{\log \left (\sin \left (\frac{1}{2} (c+d x)\right )\right )}{d}-\frac{\log \left (\cos \left (\frac{1}{2} (c+d x)\right )\right )}{d}}{a} \]

Antiderivative was successfully verified.

[In]

Integrate[Csc[c + d*x]/(a - a*Sin[c + d*x]^2),x]

[Out]

(-(Log[Cos[(c + d*x)/2]]/d) + Log[Sin[(c + d*x)/2]]/d + Sec[c + d*x]/d)/a

________________________________________________________________________________________

Maple [A]  time = 0.06, size = 51, normalized size = 1.8 \begin{align*}{\frac{1}{da\cos \left ( dx+c \right ) }}+{\frac{\ln \left ( -1+\cos \left ( dx+c \right ) \right ) }{2\,da}}-{\frac{\ln \left ( 1+\cos \left ( dx+c \right ) \right ) }{2\,da}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(csc(d*x+c)/(a-sin(d*x+c)^2*a),x)

[Out]

1/d/a/cos(d*x+c)+1/2/d/a*ln(-1+cos(d*x+c))-1/2/d/a*ln(1+cos(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 0.948757, size = 62, normalized size = 2.14 \begin{align*} -\frac{\frac{\log \left (\cos \left (d x + c\right ) + 1\right )}{a} - \frac{\log \left (\cos \left (d x + c\right ) - 1\right )}{a} - \frac{2}{a \cos \left (d x + c\right )}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/2*(log(cos(d*x + c) + 1)/a - log(cos(d*x + c) - 1)/a - 2/(a*cos(d*x + c)))/d

________________________________________________________________________________________

Fricas [A]  time = 1.6274, size = 157, normalized size = 5.41 \begin{align*} -\frac{\cos \left (d x + c\right ) \log \left (\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - \cos \left (d x + c\right ) \log \left (-\frac{1}{2} \, \cos \left (d x + c\right ) + \frac{1}{2}\right ) - 2}{2 \, a d \cos \left (d x + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="fricas")

[Out]

-1/2*(cos(d*x + c)*log(1/2*cos(d*x + c) + 1/2) - cos(d*x + c)*log(-1/2*cos(d*x + c) + 1/2) - 2)/(a*d*cos(d*x +
 c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \frac{\int \frac{\csc{\left (c + d x \right )}}{\sin ^{2}{\left (c + d x \right )} - 1}\, dx}{a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)**2),x)

[Out]

-Integral(csc(c + d*x)/(sin(c + d*x)**2 - 1), x)/a

________________________________________________________________________________________

Giac [B]  time = 1.16671, size = 84, normalized size = 2.9 \begin{align*} \frac{\frac{\log \left (\frac{{\left | -\cos \left (d x + c\right ) + 1 \right |}}{{\left | \cos \left (d x + c\right ) + 1 \right |}}\right )}{a} + \frac{4}{a{\left (\frac{\cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) + 1} + 1\right )}}}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(csc(d*x+c)/(a-a*sin(d*x+c)^2),x, algorithm="giac")

[Out]

1/2*(log(abs(-cos(d*x + c) + 1)/abs(cos(d*x + c) + 1))/a + 4/(a*((cos(d*x + c) - 1)/(cos(d*x + c) + 1) + 1)))/
d